Import('env')

test_env = env.Clone()
test_env['objroot'] += '/test'
test_env['srcroot'] += '/eventrpc'
test_env['extension'] = 'cpp'
test_env.Append(CPPPATH=[test_env['srcroot'],
  env['objroot'] + '/test'])
test_env.Append(CPPPATH=[test_env['srcroot'],
  env['objroot'] + '/sample'])
test_env.Append(LIBPATH=[env['objroot']+'/eventrpc',])
test_env.Prepend(LIBS=
  [
    'eventrpc',
  ])

test_src_files = [
  'log',
  'string_utility',
  'buffer',
]

for file in test_src_files:
  test_env.Program(file + "_test", [file + "_test.cpp"])

env.ProtocolBuffer('echo.proto')
service_src_files = [
  'message_utility_test',
  'echo_message_test',
]
for file in service_src_files:
  test_env.Program(file, [file + '.cpp', 'echo.pb.cc'])
